import {
    makeAutoObservable
} from "mobx"

class globalData {
    constructor() {
        makeAutoObservable(this)
    }

    //导航栏总高度
    navigationWrapHeight = 0;
    upNavigationWrapHeight() {
        this.navigationWrapHeight = this.navigationBarHeight + this.statusBarHeight
    }

    //导航栏高度
    navigationBarHeight = 0;
    upNavigationBarHeight(height) {
        this.navigationBarHeight = height
    }

    //导航栏内容左右内边距
    navigationLRPadding = 0;
    upNavigationLRPadding(padding) {
        this.navigationLRPadding = padding
    }

    //状态栏高度
    statusBarHeight = 0;
    upStatusBarHeight(height) {
        this.statusBarHeight = height

    }

    //窗口宽度
    windowWidth = 0;
    upWindoWidth(width) {
        this.windowWidth = width
    }


    //胶囊高度
    menuButtonHeight = 0;
    upMenuButtonHeight(height) {
        this.menuButtonHeight = height

    }

    //胶囊宽度
    menuButtonWidth = 0;
    upMenuButtonWidth(width) {
        this.menuButtonWidth = width
        this.upNavigationWrapHeight()
    }


}

const globalStore = new globalData()
export default globalStore
